package andanyoung.springcloud.user.client;

import andanyoung.springcloud.user.client.fallback.OrderFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@Component
@FeignClient(value = "order", fallback = OrderFallback.class)
public interface OrderClient {

    @GetMapping("order/{uid}")
    String getOrder(@PathVariable long uid);

    @GetMapping("failureOrder/{uid}")
    String getFailureOrder(@PathVariable long uid);
}
